﻿<UserControl x:Class="LaunchPad.Core.Controls.EffectTimelineControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="176" d:DesignWidth="168">
        <Grid>
        <DataGrid AutoGenerateColumns="False" EnableRowVirtualization="True" HorizontalAlignment="Stretch" 
                  ItemsSource="{Binding Path=Timeline}" Name="timelineDataGrid"
                  VerticalAlignment="Stretch" ColumnWidth="SizeToCells" InitializingNewItem="TimelineDataGridInitializingNewItem" CanUserAddRows="False">
            <DataGrid.Columns>
                <DataGridTextColumn x:Name="stateColumn" Binding="{Binding Path=State}" Header="State" Width="Auto" />
                <DataGridTextColumn x:Name="timeColumn" Binding="{Binding Path=Time}" Header="Time" Width="Auto" />
                <DataGridTextColumn x:Name="leadInColumn" Binding="{Binding Path=LeadIn}" Header="LeadIn" Width="Auto" />
                <DataGridTextColumn x:Name="leadOutColumn" Binding="{Binding Path=LeadOut}" Header="LeadOut" Width="Auto" />
                <DataGridTextColumn x:Name="startColumn" Binding="{Binding Path=Start}" Header="Start" Width="Auto" />
                <DataGridTextColumn x:Name="finishColumn" Binding="{Binding Path=Finish}" Header="Finish" Width="Auto" />
            </DataGrid.Columns>
            <DataGrid.RowStyle>
                <Style TargetType="{x:Type DataGridRow}">
                    <Style.Triggers>
                        <DataTrigger Binding="{Binding Path=IsHovered}" Value="True">
                            <Setter Property="Background" Value="LightSteelBlue" />
                        </DataTrigger>
                    </Style.Triggers>
                </Style>
            </DataGrid.RowStyle>
        </DataGrid>
    </Grid>
</UserControl>
